Object is the base class for Kanzi UI classes that implement association with a Domain. More...
Classes | |
class | Iterator |
Public Member Functions | |
boolean | equals (Object object) |
Domain | getDomain () |
Returns the domain the object belongs to. More... | |
Metaclass | getDynamicMetaclass () |
Returns the metaclass of the dynamic type of the object. More... | |
long | getNative () |
Gets a pointer to the backing C++ instance. More... | |
TDataType | getOptionalProperty (PropertyType< TDataType > propertyType) |
Returns the current value of a property type, but does not use the default value if there are no inputs to the property value. More... | |
TDataType | getProperty (PropertyType< TDataType > propertyType) |
Returns the current value of a property type. More... | |
int | hashCode () |
boolean | hasValue (PropertyType< TDataType > propertyType) |
Evaluates whether there are any inputs into the property value. More... | |
boolean | isStale () |
Test if the object is stale i.e. More... | |
void | removeLocalValue (PropertyType< TDataType > propertyType) |
Removes the local value associated with the property. More... | |
void | setProperty (PropertyType< TDataType > propertyType, TDataType value) |
Sets the local value of a property type. More... | |
ObjectRef< TType > | tryCreateObjectRef (Class< TType > clazz) |
Tries to create an owning ObjectRef instance to this KanziObject. More... | |
Static Public Attributes | |
static final Metaclass | metaclass = new AbstractMetaclass("Kanzi.Object") |
The Metaclass for the class. | |
Object is the base class for Kanzi UI classes that implement association with a Domain.
Domain getDomain | ( | ) |
Returns the domain the object belongs to.
Metaclass getDynamicMetaclass | ( | ) |
Returns the metaclass of the dynamic type of the object.
long getNative | ( | ) |
Gets a pointer to the backing C++ instance.
TDataType getOptionalProperty | ( | PropertyType< TDataType > | propertyType | ) |
Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
This method returns a value that is the result of the property system evaluating the inputs that can affect the values of properties. It calculates the final value by determining the base value of the property and applying existing modifiers to it.
Base value is affected by the following inputs where the highest entry in the list determines the base value:
When the base value is determined the system applies modifiers to the value that can change the value or replace it completely. The following is the list of possible modifiers, where the order of evaluation is determined by the order the modifiers were added or applied:
It is not possible to use this method to determine if a Resource type property is actually set with the value of null, or if it is unset and null is returned. The KanziObject.hasValue() method can be used with a property of Resource type.
propertyType | The property type identifying the property to retrieve. |
<TDataType> | Data type of the property, optional. |
TDataType getProperty | ( | PropertyType< TDataType > | propertyType | ) |
Returns the current value of a property type.
This function returns a value that is the result of the property system evaluating the inputs that can affect the values of properties. It calculates the final value by determining the base value of the property and applying existing modifiers to it.
Base value is affected by the following inputs where the highest entry in the list determines the base value:
When the base value is determined the system applies modifiers to the value that can change the value or replace it completely. The following is the list of possible modifiers, where the order of evaluation is determined by the order the modifiers were added or applied.
If no inputs to the property value can be established the system returns the value registered in the property type metadata.
propertyType | The property type identifying the property to retrieve. |
<TDataType> | Data type of the property, optional. |
boolean hasValue | ( | PropertyType< TDataType > | propertyType | ) |
Evaluates whether there are any inputs into the property value.
Both value sources and modifiers are taken into account.
propertyType | The property type identifying the property to evaluate. |
boolean isStale | ( | ) |
Test if the object is stale i.e.
the backing native object has been deleted. Most usage of a stale object will throw a StaleObjectException.
void removeLocalValue | ( | PropertyType< TDataType > | propertyType | ) |
Removes the local value associated with the property.
propertyType | The property type identifying the property to evaluate. |
void setProperty | ( | PropertyType< TDataType > | propertyType, |
TDataType | value | ||
) |
Sets the local value of a property type.
propertyType | The property type identifying the property to set. |
value | value The value to set. |
<TDataType> | Defines the data type of the property, optional. |
ObjectRef<TType> tryCreateObjectRef | ( | Class< TType > | clazz | ) |
Tries to create an owning ObjectRef instance to this KanziObject.
If the object is already stale, returns null.
If the object type does not match the provided class, throws a ClassCastException.
clazz | The type of the KanziObject. |
<TType> | The KanziObject type. |